package org.springframework.orm.jpa.persistenceunit;

import java.lang.instrument.ClassFileTransformer;
import java.lang.instrument.Instrumentation;

/**
 * <p></p>
 *
 * @author linhx
 * @date 2022/3/9
 */
public class PerfMonAgent {

	private static Instrumentation inst;

	public static void permain(String agentArgs, Instrumentation _inst) {
		System.out.println("PerfMonAgent.premain() was called.");
		PerfMonAgent.inst = _inst;
		ClassFileTransformer trans = new PerfMonXformer();
		System.out.println("Adding a PerfMonXformer instance to the JVM.");
		PerfMonAgent.inst.addTransformer(trans);
	}
}
